package com.web;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.data.HibernateSqlService;
import com.data.hibernate.*;

@Controller
public class MenuController {

	@Autowired
	private MenuDAO menuDao;

	@RequestMapping
	public ModelAndView getTopMenu() {
		return new ModelAndView("menuTabs", "data", menuDao
				.getHibernateTemplate().find(
						"from Tmenu where parentId is null and Enabled=true"));
	}

}
